package com.yc.demo2.dto;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author navy
 * @company 源辰信息
 * @date 2024/9/8
 * @email haijunzhou@hnit.edu.cn
 */
@Data
@Component  // 通用组件注解
@ConfigurationProperties(prefix = "demo")
public class Person {
    String name;
    int age;
    String[] likes;
    List<String> schools;
    Set<Person> friends;
    Map<String,String> familys;
    List<Dog> dogs;
}

@Data
class Dog{
    String name;
    int age;
}
